import type { Book, QueryBooksDataResult } from '@/api/types/query';

import { API_ENUM, API_CONFIG } from './api';
import { hocksApi } from '@/api/utils/apiProcessingHocks';
import type { AxiosResponse } from 'axios';
const QueryBooksData = (params: Book): Promise<QueryBooksDataResult> => {
  return hocksApi(API_CONFIG[API_ENUM.QUERY_BOOKS], params, (response: AxiosResponse<any>): QueryBooksDataResult => {
    return response.data as QueryBooksDataResult;
  }).post();
};

export { QueryBooksData };
